
#include "Image.h"

Image::Image(Image* image) {
    setDimensions(image->getWidth(), image->getHeight());
    setRelativeArea(image->getRelativeArea());
}

Image::Image(int width, int height, double priority) {
    this->setDimensions(width, height);
    this->setRelativeArea(priority);
}

void Image::setDimensions(int width, int height) {
    this->setHeight(height);
    this->setWidth(width);
}

void Image::setRelativeArea(double priority) {
    this->priority = priority;
}

void Image::setHeight(int height) {
    this->height = height;
}

void Image::setWidth(int width) {
    this->width = width;
}

int Image::getHeight() {
    return this->height;
}

int Image::getWidth() {
    return this->width;
}

double Image::getArea() {
    return this->getHeight() * this->getWidth();
}

double Image::getRelativeArea() {
    return this->priority;
}

double Image::getAspectRatio() {
    return ((double)(this->getHeight())) / ((double)(this->getWidth()));
}
